local tool_repair ={
   {'default:axe_steel', 'default:steel_ingot'},
   {'default:pick_steel', 'default:steel_ingot'},
   {'default:shovel_steel', 'default:steel_ingot'},
   {'default:sword_steel', 'default:steel_ingot'},
   {'farming:hoe_steel', 'default:steel_ingot'},
   {'mobs:shears', 'default:steel_ingot'},
   {'default:axe_bronze', 'default:bronze_ingot'},
   {'default:pick_bronze', 'default:bronze_ingot'},
   {'default:shovel_bronze', 'default:bronze_ingot'},
   {'default:sword_bronze', 'default:bronze_ingot'},
   {'default:axe_mese', 'default:mese_crystal'},
   {'default:pick_mese', 'default:mese_crystal'},
   {'default:shovel_mese', 'default:mese_crystal'},
   {'default:sword_mese', 'default:mese_crystal'},
   {'3d_armor:boots_bronze', 'default:bronze_ingot'},
   {'3d_armor:boots_steel', 'default:steel_ingot'},
   {'3d_armor:boots_gold', 'default:gold_ingot'},
   {'3d_armor:chestplate_bronze', 'default:bronze_ingot'},
   {'3d_armor:chestplate_steel', 'default:steel_ingot'},
   {'3d_armor:chestplate_gold', 'default:gold_ingot'},
   {'3d_armor:helmet_bronze', 'default:bronze_ingot'},
   {'3d_armor:helmet_steel', 'default:steel_ingot'},
   {'3d_armor:helmet_gold', 'default:gold_ingot'},
   {'3d_armor:leggings_bronze', 'default:bronze_ingot'},
   {'3d_armor:leggings_gold', 'default:gold_ingot'},
   {'3d_armor:leggings_steel', 'default:steel_ingot'},
   {'shields:shield_bronze', 'default:bronze_ingot'},
   {'shields:shield_steel', 'default:steel_ingot'},
   {'shields:shield_gold', 'default:gold_ingot'},
   {'castle_weapons:battleaxe', 'default:steel_ingot'},
   {'castle_weapons:crossbow', 'default:steel_ingot'},
   {'stations:hammer', 'default:steel_ingot'},
   {'epic:pick_titanium', 'epic:titanium_ingot'},
   {'epic:shovel_titanium', 'epic:titanium_ingot'},
   {'epic:axe_titanium', 'epic:titanium_ingot'},
   {'epic:sword_titanium', 'epic:titanium_ingot'},
   {'epic:helmet_titanium', 'epic:titanium_ingot'},
   {'epic:boots_titanium', 'epic:titanium_ingot'},
   {'epic:chestplate_titanium', 'epic:titanium_ingot'},
   {'epic:leggings_titanium', 'epic:titanium_ingot'},
   {'epic:shield_titanium', 'epic:titanium_ingot'},
   {'epic:shovel_soft', 'default:tin_ingot'},
   {'farming:scythe', 'epic:titanium_ingot'},
   {'torch_bomb:torch_crossbow_steel', 'default:steel_ingot'},
   {'torch_bomb:torch_crossbow_bronze', 'default:bronze_ingot'}
}

for i in ipairs (tool_repair) do
   local tool = tool_repair[i][1]
   local material = tool_repair[i][2]

   -- no stations.dual_register_recipe() to ignore registering repair recipes...
   --
   simplecrafting_lib.register('anvil', {
      input = {
         [tool] = 1,
         [material] = 1,
      },
      output = tool,
   })
end

--Steel Tools
stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:pick_steel',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:axe_steel',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 1,
      ['default:stick'] = 2,
   },
   output = 'default:shovel_steel',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 3,
   },
   output = 'default:sword_steel',
})

--Bronze tools
stations.dual_register_recipe('anvil', {
   input = {
      ['default:bronze_ingot'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:pick_bronze',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:bronze_ingot'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:axe_bronze',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:bronze_ingot'] = 1,
      ['group:stick'] = 2,
   },
   output = 'default:shovel_bronze',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:bronze_ingot'] = 3,
   },
   output = 'default:sword_bronze',
})

--Mese tools
stations.dual_register_recipe('anvil', {
   input = {
      ['default:mese_crystal'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:pick_mese',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:mese_crystal'] = 3,
      ['group:stick'] = 1,
   },
   output = 'default:axe_mese',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:mese_crystal'] = 1,
      ['group:stick'] = 2,
   },
   output = 'default:shovel_mese',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:mese_crystal'] = 3,
   },
   output = 'default:sword_mese',
})

--Titanium tools
stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 3,
      ['darkage:iron_stick'] = 1,
   },
   output = 'epic:pick_titanium',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 1,
      ['darkage:iron_stick'] = 2,
   },
   output = 'epic:shovel_titanium',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 3,
      ['darkage:iron_stick'] = 1,
   },
   output = 'epic:axe_titanium',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 3,
   },
   output = 'epic:sword_titanium',
})

--Misc
stations.dual_register_recipe('anvil', {
   input = {
      ['ropes:ropesegment'] = 1,
      ['default:steel_ingot'] = 2,
   },
   output = 'epic:sign_post_metal',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['ocean:prismarine_crystals'] = 1,
      ['epic:bloodstone'] = 1,
      ['default:steel_ingot'] = 1,
   },
   output = 'furniture:lantern_ceiling',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:tin_ingot'] = 3,
      ['darkage:iron_stick'] = 2,
   },
   output = 'epic:shovel_soft',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 6,
   },
   output = 'castle_weapons:battleaxe',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 2,
      ['group:stick'] = 1,
   },
   output = 'farming:scythe',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 4,
      ['default:tin_ingot'] = 1,
   },
   output = 'stations:stain',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 1,
   },
   output = 'epic:arrow_tip 20',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 1,
   },
   output = 'mobs:horseshoe_steel',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:bronze_ingot'] = 1,
   },
   output = 'mobs:horseshoe_bronze',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:mese_crystal'] = 1,
   },
   output = 'mobs:horseshoe_mese',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 2,
   },
   output = 'scaffolding:scaffolding_wrench',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:lead_lump'] = 1,
   },
   output = 'epic:lead_wire 10',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 1,
   },
   output = 'furniture:hinge 10',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 1,
   },
   output = 'furniture:lock',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['default:steel_ingot'] = 2,
   },
   output = 'default:sign_wall_steel',
})


stations.dual_register_recipe('anvil', {
   input = {
      ['default:diamondblock'] = 1,
      ['default:goldblock'] = 1,
      ['epic:titanium_ingot'] = 1,
      ['epic:glowingdiamond'] = 1,
   },
   output = 'filler:filler',
})

--3d_Armor recipes
local armor_material = {
   steel = 'default:steel_ingot',
   bronze = 'default:bronze_ingot',
   gold = 'default:gold_ingot',
}

for name, mat in pairs(armor_material) do
   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 5,
         ['mobs:leather'] = 1,
      },
      output = '3d_armor:helmet_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 8,
         ['mobs:leather'] = 1,
      },
      output = '3d_armor:chestplate_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
         ['mobs:leather'] = 1,
      },
      output = '3d_armor:leggings_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 4,
         ['mobs:leather'] = 1,
      },
      output = '3d_armor:boots_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 5,
         ['epic:burlap'] = 1,
      },
      output = '3d_armor:helmet_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 8,
         ['epic:burlap'] = 1,
      },
      output = '3d_armor:chestplate_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
         ['epic:burlap'] = 1,
      },
      output = '3d_armor:leggings_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 4,
         ['epic:burlap'] = 1,
      },
      output = '3d_armor:boots_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
      },
      output = 'shields:shield_'..name,
   })
end

--Armor recipes
local armor_material = {
   titanium = 'epic:titanium_ingot',
}

for name, mat in pairs(armor_material) do
   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 5,
         ['mobs:leather'] = 1,
      },
      output = 'epic:helmet_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 8,
         ['mobs:leather'] = 1,
      },
      output = 'epic:chestplate_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
         ['mobs:leather'] = 1,
      },
      output = 'epic:leggings_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 4,
         ['mobs:leather'] = 1,
      },
      output = 'epic:boots_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 5,
         ['epic:burlap'] = 1,
      },
      output = 'epic:helmet_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 8,
         ['epic:burlap'] = 1,
      },
      output = 'epic:chestplate_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
         ['epic:burlap'] = 1,
      },
      output = 'epic:leggings_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 4,
         ['epic:burlap'] = 1,
      },
      output = 'epic:boots_'..name,
   })

   stations.dual_register_recipe('anvil', {
      input = {
         [mat] = 7,
      },
      output = 'epic:shield_'..name,
   })
end
--[[ only needed once I find out how to use the fuel stuff.
stations.dual_register_recipe('anvil_fuel', {
   input = {['default:coal_lump'] = 1},
   output = 'simplecrafting_lib:heat 20',
})

stations.dual_register_recipe('anvil_fuel', {
   input = {['default:coalblock'] = 1},
   output = 'simplecrafting_lib:heat 180',
})

stations.dual_register_recipe('anvil_fuel', {
   input = {['charcoal:charcoal'] = 1},
   output = 'simplecrafting_lib:heat 15',
})

stations.dual_register_recipe('anvil_fuel', {
   input = {['charcoal:charcoal_block'] = 1},
   output = 'simplecrafting_lib:heat 135',
})
--]]

--shapes
stations.dual_register_recipe('anvil', {
   input = {
      ['default:gold_ingot'] = 1,
   },
   output = 'shapes:gold_triangle_0',
})


--Hoppers
stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 2,
      ['default:gold_ingot'] = 1,
      ['default:steel_ingot'] = 1,
   },
   output = 'hopper:chute',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 5,
      ['default:gold_ingot'] = 1,
      ['default:steel_ingot'] = 1,
   },
   output = 'hopper:hopper',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 2,
      ['default:gold_ingot'] = 1,
      ['default:steel_ingot'] = 1,
      ['default:mese'] = 1,
   },
   output = 'hopper:sorter',
})

stations.dual_register_recipe('anvil', {
   input = {
      ['epic:titanium_ingot'] = 2,
      ['default:gold_ingot'] = 1,
      ['default:steel_ingot'] = 1,
      ['stations:hammer'] = 1,
   },
   output = 'hopper:trash',
})
